<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 3.0 License

Name       : Big Business
Description: A two-column, fixed-width design with a bright color scheme.
Version    : 1.0
Released   : 20120210
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="description" content="" />
<meta name="keywords" content="" />
<title>Big Business by Free CSS Templates</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../style.css" />

<style type="text/css">
.col1 {
	text-align:right;
}

.col2 {
	text-align:left;
}

.head-t{
	text-align:center;
	background-color:#fafafa;
}

.button_role{
text-align:center; 
cursor:pointer;
background-color:#f8f8f8; 
width:70px;
}

.button_role:hover{
border: 1px solid #000;
}

a{
text-decoration:none;
padding:5px 5px 5px 5px;
}
</style>
</head>
<body>
<div id="wrapper">
	<div id="header">
		<div id="logo">
			<h1><a href="#"><span id="soc_name1"></span></a></h1>
		</div>
		<div id="slogan">
			<h2>Welcome Administrator</h2>
		</div>
	</div>
	<div id="menu">
		<ul>
			<li class="first current_page_item"><a href="#">Setup Page</a></li>
			<li><a href="Committee/committee">Committee</a></li>
			<li><a href="Member/members-1.html">Members</a></li>
			<li><a href="#">Contacts</a></li>
		</ul>
		<br class="clearfix" />
	</div>

	<div id="page">
			<table width="100%" cellspacing=10>
				<tr>
					<td colspan=2 style="text-align:center;" class="head-t">
						<div style="text-slign:center;"> Society Information</div>
					</td>
				</tr>
				<tr>
					<td class="col1">Name of the society</td>
					<td class="col2"><input type="text" name="soc_name" size=60 id="soc_name"/></td>
				</tr>
				<tr>
					<td class="col1">Describe your society</td>
					<td class="col2"><textarea name="soc_desc" rows=5 cols=60 id="soc_desc"></textarea></td>
				</tr>
				<tr>
					<td colspan=2 style="text-align:center;">
						<a href="javascript:void(0);" class="button_role" id="save_soc">Save</a>
					</td>
				</tr>
				
				<tr>
					<td colspan=2 style="text-align:center;">
						<span id="msg_soc" style="display: none;"></span>
					</td>
				</tr>
			</table>
			
			<br class="clearfix"/>
			
			<table width="100%" cellspacing=20>
				<tr>
					<td colspan=6 style="text-align:center;" class="head-t">
						<div style="text-slign:center;">Building Setup</div>
					</td>
				</tr>
				<tr>
					<td class="col1">Building name</td>
					<td class="col2"><input type="text" name="b_name" id="b_name"/></td>
					<td class="col1">Building Code</td>
					<td class="col2"><input type="text" name="b_code" id="b_code"/></td>
					<td class="col1">Building Description</td>
					<td class="col2"><input type="text" name="b_desc" id="b_desc"/></td>
					
				</tr>
			
				<tr>
					<td colspan=6 style="text-align:center;">
						<a href="javascript:void(0);" class="button_role" id="save_building">Save</a>
					</td>
				</tr>
				
				<tr>
					<td colspan=6 style="text-align:center;">
						<span id="msg_building" style="display: none;"></span>
					</td>
				</tr>
			</table>
			
			<br class="clearfix"/>
			
			<table width="100%" cellspacing=20>
				<tr>
					<td colspan=2 style="text-align:center;" class="head-t">
						<div style="text-slign:center;">Flat Setup</div>
					</td>
				</tr>
				<tr>
					<td class="col1">Flat Numbers(in range : e.g. 101-104, 201-204)</td>
					<td class="col2"><input type="text" name="flat_range" size=60 id="flat_range"/></td>
					
				</tr>
			
				<tr>
					<td colspan=2 style="text-align:center;">
						<a href="javascript:void(0);" class="button_role" id="save_flat">Save</a>
					</td>
				</tr>
				
				<tr>
					<td colspan=2 style="text-align:center;">
						<span id="msg_flat" style="display: none;"></span>
					</td>
				</tr>
			</table>
			
			<br class="clearfix"/>
			
			<table width="100%" cellspacing=20>
				<tr>
					<td colspan=4 style="text-align:center;" class="head-t">
						<div style="text-slign:center;">Add Responsibilities</div>
					</td>
				</tr>
				<tr>
					<td class="col1">Name</td>
					<td class="col2"><input type="text" name="r_name" id="r_name" size=40/></td>
					<td class="col1">Code</td>
					<td class="col2"><input type="text" name="r_code" id="r_code" size=40/></td>
				</tr>
			
				<tr>
					<td colspan=4 style="text-align:center;">
						<a href="javascript:void(0);" class="button_role" id="save_resp">Save</a>
					</td>
				</tr>
				
				<tr>
					<td colspan=4 style="text-align:center;">
						<span id="msg_resp" style="display: none;"></span>
					</td>
				</tr>
			</table>
			
		</div>
	</div>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>  
<script type="text/javascript">
$(document).ready(function(){
	
	$.get("../bind?id=soc_name",function(data){
		$("#soc_name1").html(data);
	});
	
	$("#save_soc").click(function(e) {
		
		var soc_name = $("#soc_name").val();
		var soc_desc = $("#soc_desc").val();
		
		if(soc_name == ""|| soc_desc == "") {
			$("#msg_soc").html("<span style='color:red;'> Fill all data </span>");
			$("#msg_soc").css("display", "block");
			
			return false;
		}
		$.post("../society-setup" , {id : "soc", name : soc_name, desc : soc_desc}, function(data){
			$("#msg_soc").html(data);
			$("#msg_soc").css("display", "block");
		});
	});
	
$("#save_building").click(function(e) {
		
		var b_name = $("#b_name").val();
		var b_code = $("#b_code").val();
		var b_desc = $("#b_desc").val();
		
		if(b_name == ""|| b_desc == "" || b_code=="") {
			$("#msg_building").html("<span style='color:red;'> Fill all data </span>");
			$("#msg_building").css("display", "block");
			
			return false;
		}
		$.post("../society-setup" , {id : "building", name : b_name, desc : b_desc, code : b_code}, function(data){
			$("#msg_building").html(data);
			$("#msg_building").css("display", "block");
		});
	});
	
$("#save_flat").click(function(e) {
	
	var range = $("#flat_range").val();
	
	if(range=="") {
		$("#msg_flat").html("<span style='color:red;'> Fill all data </span>");
		$("#msg_flat").css("display", "block");
		
		return false;
	}
	$.post("../society-setup" , {id : "flat", flat_range:range}, function(data){
		$("#msg_flat").html(data);
		$("#msg_flat").css("display", "block");
	});
});

$("#save_resp").click(function(e) {
	
	var name = $("#r_name").val();
	var code = $("#r_code").val();
	
	if(name=="" || code == "") {
		$("#msg_resp").html("<span style='color:red;'> Fill all data </span>");
		$("#msg_resp").css("display", "block");
		
		return false;
	}
	$.post("../society-setup" , {id : "add_resp", resp_name : name, resp_code : code}, function(data){
		$("#msg_resp").html(data);
		$("#msg_resp").css("display", "block");
	});
});

});

</script>
</body>
</html>